import java.util.TreeMap;
import java.util.TreeSet;


public class Teste {

	private static TreeSet<String> ReadingSimbols(String line){
		
		TreeSet<String> set = new TreeSet<String>();
		String[] simbols = line.split(",");
		
		for (String simbol : simbols) set.add(simbol);
		
		return set;
	}
	
	private static TreeMap<String,TreeMap<String,TreeSet<String>>> ReadingDelta(String line){
		
		TreeMap<String,TreeMap<String,TreeSet<String>>> map = new TreeMap<String,TreeMap<String,TreeSet<String>>>();
		String[] functions = line.split("\\)"); 
		String from, how, to; 
		int index;
		
		for (String simbol : functions){
			simbol = simbol.substring(simbol.indexOf('(')+1);
			
			index = simbol.indexOf(',');
			from = simbol.substring(0, index);
			how = simbol.substring(index+1, simbol.indexOf(',', index+1));
			to = simbol.substring(simbol.indexOf('{')+1, simbol.lastIndexOf('}'));
			
			map.put(from, new TreeMap<String, TreeSet<String>>());
			map.get(from).put(how, ReadingSimbols(to));
		}
		
		return map;
	}
	
	public static void main(String[] args) {

		/*TreeMap<String,TreeMap<String,TreeSet<String>>> delta;
		
		String teste = "{(A, b, {A,B,C,D}),(B, a, {C,D}),(A,eps,{D})}".replaceAll(" ", "");
		
		teste = teste.substring(teste.indexOf('{')+1, teste.lastIndexOf('}'));
		
		delta = ReadingDelta(teste);*/
		
		String a = "a";
		
		System.out.println(a.substring(a.indexOf("a")+1).length());
		
	}

}
